About 735 letters

About 4 minutes

#dir

Description: Returns a list of names in the current local scope or a list of attributes of an object.

def dir():
    '''
    Returns a list of names in the current local scope

    :return: A list of names in the current local scope
    '''

def dir(obj):
    '''
    Returns a list of valid attributes of the object

    :param obj: An object
    :return: A list of valid attributes of the object
    '''

Example:

print("List of names in local scope:", dir())
print("List of valid attributes of a string:", dir('hello world'))

>>> Establishing WebAssembly Runtime.

>>> Standby.

Powered by Shift.

Updated: 6/9/2025

Author: PlanC

Created: 6/9/2025